import {
    MenuParams,
    MenuListGetResultModel,
} from '../model/systemModel';
import {defHttp} from '/@/utils/http/axios';

enum Api {
    MenuTree = '/access/menu/tree',
    MenuList = '/access/menu/list',
    MenuUpdate = '/access/menu',
}


export const getMenuTree = (params?: MenuParams) =>
    defHttp.get<MenuListGetResultModel>({url: Api.MenuTree, params});

export const getMenuList = () =>
    defHttp.get({url: Api.MenuList});


export const putMenuUpdate = (data) =>
    defHttp.put({url: Api.MenuUpdate,data});
